<?php
### 看静态方法调用时，所属对象是谁
class Father
{

    public function getNewFather()
    {

        return new self();

    }

    public function getNewCaller()
    {

        return new static();

    }

}

$f = new Father();

print get_class($f->getNewFather());
echo PHP_EOL;

print get_class($f->getNewCaller());
echo PHP_EOL;
class Sun1 extends Father
{

}

class Sun2 extends Father
{

}

$sun1 = new Sun1();
$sun2 = new Sun2();

print get_class($sun1->getNewFather());
echo PHP_EOL;

print get_class($sun1->getNewCaller());
echo PHP_EOL;

print get_class($sun2->getNewFather());
echo PHP_EOL;

print get_class($sun2->getNewCaller());